home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / m / muiv3.1cracked.lha / MUI / Developer / Modula / txt / MuiSupport.mod < prev   
Text File  |  1995-09-25  |  2KB  |  109 lines

  1. IMPLEMENTATION MODULE MuiSupport;
  2.  
  3. (*$ NilChk      := FALSE *)
  4. (*$ EntryClear  := FALSE *)
  5. (*$ LargeVars   := FALSE *)
  6. (*$ StackParms  := FALSE *)
  7.  
  8. (*$ DEFINE Locale:=FALSE *)
  9.  
  10. (* MuiSupport 2.0
  11. ** converted by C.Scholz
  12. **
  13. ** HISTORY :
  14. **
  15. ** 22.10.1993 : changed fail, it now does not use Terminal anymore.
  16. **              Instead it uses Arts.Requester
  17. **              (inspired by Michael Suelman)
  18. **
  19. ** $Log: MuiSupport.mod $
  20.  * Revision 1.1  1995/09/25  15:32:52  olf
  21.  * Initial revision
  22.  *
  23. # Revision 1.6  1994/08/16  20:33:19  Kochtopf
  24. # fail bei +LOCALE berichtigt, so dass der String nicht auf 0C, sondern
  25. # auf NIL getestet wird.
  26. #
  27. # Revision 1.5  1994/08/11  17:00:11  Kochtopf
  28. # *** empty log message ***
  29. #
  30. # Revision 1.4  1994/02/09  14:50:03  Kochtopf
  31. # Versionsnummer in 2.0 geaendert.
  32. #
  33. # Revision 1.3  1994/02/02  09:37:18  Kochtopf
  34. # app bei fail in VAR-Parameter geaendert.
  35. #
  36. # Revision 1.2  1994/02/01  16:49:10  Kochtopf
  37. # kleine Veraenderungen.
  38. #
  39. **
  40. **
  41. *)
  42.  
  43.  
  44. IMPORT R;
  45. IMPORT MD:MuiD;
  46. IMPORT ML:MuiL;
  47. FROM Arts       IMPORT StrPtr, returnVal, Exit, Requester;
  48. FROM SYSTEM     IMPORT ASSEMBLE, ADDRESS, ADR;
  49. FROM IntuitionD IMPORT IClassPtr;
  50. FROM UtilityD   IMPORT Hook;
  51.  
  52.  
  53. PROCEDURE DoMethod(obj{R.A2} : APTR; msg{R.A1} : APTR);
  54. (*$ EntryExitCode:=FALSE *)
  55.  
  56. BEGIN
  57.  
  58.     ASSEMBLE (  MOVEA.L -4(A2),  A0
  59.                 MOVE.L   8(A0),-(A7)
  60.                 RTS
  61.                 END );
  62.  
  63. END DoMethod;
  64.  
  65. PROCEDURE DOMethod(obj{R.A2} : APTR; msg{R.A1} : APTR) : LONGINT;
  66. (*$ EntryExitCode:=FALSE *)
  67.  
  68. BEGIN
  69.  
  70.     ASSEMBLE (  MOVEA.L -4(A2),  A0
  71.                 MOVE.L   8(A0),-(A7)
  72.                 RTS
  73.                 END );
  74.  
  75. END DOMethod;
  76.  
  77.  
  78.  
  79. (*****************)
  80. (* Fail Function *)
  81. (*****************)
  82.  
  83. (*$ IF Locale *)
  84. PROCEDURE fail(VAR app : APTR; str : StrPtr);
  85. (*$ ELSE *) (*$ CopyDyn := FALSE *)
  86. PROCEDURE fail(VAR app : APTR; str : ARRAY OF CHAR);
  87. (*$ ENDIF *)
  88.  
  89.     VAR
  90.         Result     : BOOLEAN;
  91.  
  92.     BEGIN
  93.         IF app#NIL THEN ML.mDisposeObject(app); app:=NIL; END;
  94.  
  95.                 (*$ IF Locale *)
  96.         IF str # NIL THEN
  97.                     Result:=Requester(ADR("MUI-Request"),str,NIL,ADR("Oh..."));
  98.                 (*$ ELSE *)
  99.         IF str[0]#0C THEN
  100.                     Result:=Requester(ADR("MUI-Request"),ADR(str),NIL,ADR("Oh..."));
  101.                 (*$ ENDIF *)
  102.                 Exit(20);
  103.            ELSE
  104.                 Exit(0);
  105.            END;
  106.     END fail;
  107.  
  108. END MuiSupport.
  109.